//---------------------------------------------------------------------------
template<typename K, typename V>
bool extmap<K, V>::is_exist( const K& key )
{
	return find(key) != end();
}
//---------------------------------------------------------------------------
template<typename K, typename V>
bool extmap<K, V>::remove( const K& key )
{
	iterator it = find(key);
	if(it == end()){
		return false;
	}

	erase(it);

	return true;
}
//---------------------------------------------------------------------------
template<typename K, typename V>
void extmap<K, V>::add(K& key, V& val)
{
	extmap<K, V>::_Pairib res = insert(extmap<K, V>::value_type(key, val));
	if( res.second == false ){
		throw std::exception("already in map");
	}
}
//---------------------------------------------------------------------------
template<typename K, typename V>
void extmap<K, V>::add(const K& key, const V& val)
{
	extmap<K, V>::_Pairib res = insert(extmap<K, V>::value_type(key, val));
	if( res.second == false ){
		throw std::exception("already in map");
	}
}
//---------------------------------------------------------------------------
template<typename K, typename V>
void extmap<K, V>::set( const K& key, const V& val )
{
	if(is_exist(key)){
		(*this)[key] = val;
	}
	else{
		add(key, val);
	}
}
//---------------------------------------------------------------------------
template<typename K, typename V>
void extmap<K, V>::set( K& key, V& val )
{
	if(is_exist(key)){
		(*this)[key] = val;
	}
	else{
		add(key, val);
	}
}
//---------------------------------------------------------------------------